{% extends "library/base.html" %}
{% load staticfiles %}
{% block title %}修改密码{% endblock %}

{% block content %}

    <div class="container">
        <div class="row">
            <div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">

                {% if state %}
                    <div class="alert alert-success text-center">
                        <a href="#" class="close" data-dismiss="alert">&times;</a>
                        {% if state == 'password_error' %}
                            <h2>密码错误</h2>
                        {% elif state == 'repeat_error' %}
                            <h2>密码重复错误</h2>
                        {% elif state == 'empty' %}
                            <h2> 密码不能为空</h2>
                        {% elif state == 'success' %}
                            <h2>修改成功</h2>
                        {% endif %}
                    </div>
                {% endif %}


                <form method="POST" role="form" class="form-horizontal">
                    {% csrf_token %}
                    <h1 class="form-signin-heading text-center">修改密码</h1>

                    {% for field in resetPasswordForm %}
                        <div class="form-group">
                            <label class="col-md-3 control-label">{{ field.label }}</label>
                            <div class="col-md-9">
                                {{ field }}
                            </div>
                        </div>
                    {% endfor %}

                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-4">
                            <button class="btn btn btn-primary btn-block" type="submit">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

{% endblock %}
